package com.wushi.lenovo.asia5b.app_di.other.presenter;

import android.app.Activity;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.net.Uri;
import android.os.Build;
import android.support.v7.app.AlertDialog;
import android.text.TextUtils;

import com.mvp.base.BasePresenter;
import com.mvp.common.GlobalValue;
import com.mvp.common.LocalManageUtil;
import com.wushi.lenovo.asia5b.app_di.other.mvpview.VersionH5FragmentView;
import com.wushi.lenovo.asia5b.app_di.other.mvpview.VersionManagerFragmentView;
import com.wushi.lenovo.asia5b.app_http.ApiService;
import com.wushi.lenovo.asia5b.app_model.other.UpdateModel;

import java.util.Map;

import javax.inject.Inject;

import timber.log.Timber;


/**
 * Created by zhangyuncai on 2019/4/18.
 */
public class VersionH5FragmentPresenter extends BasePresenter<VersionH5FragmentView> {

    ApiService apiService;

    @Inject
    public VersionH5FragmentPresenter(ApiService apiService) {
        this.apiService = apiService;
    }


    public void setH5Version() {
        baseSubscribe(apiService.setH5Version(),
                resultModel -> {
                    getView().setH5VersionResult(resultModel);
                });
    }

    public void getH5Version() {
        baseSubscribe(apiService.getH5Version("android"),
                resultModel -> {
                    getView().getH5VersionResult(resultModel);
                });
    }

}